package com.forekonw.demotest110204;

public class Test {
    public static void main(String[] args) {
        System.out.println("              ===初期薪资===");
        Manager manager = new Manager();
        manager.setComm(500.0);
        manager.setName("小明");
        Clerk clerk = new Clerk();
        clerk.setName("小亮");
        Company company = new Company();
        double ming = manager.money1;
        double yue1 = manager.getSalary();
        double liang = clerk.money2;
        double yue2 = clerk.getSalary();
        System.out.println(manager.getName() + "的薪资: " + ming + "   |   " + "银行卡余额: " + yue1);
        System.out.println(clerk.getName() + "的薪资: " + liang + "   |   " + "银行卡余额: " + yue2);
        System.out.println("              ===第一个月===");
        double sal1 = company.salary(ming, manager.getComm());//一个月工资ming
        double sal2 = company.salary(liang, clerk.getComm());//一个月工资liang
        System.out.println(manager.getName() + "的薪资: " + ming + "   |   " + "银行卡余额: " + sal1);
        System.out.println(clerk.getName() + "的薪资: " + liang + "   |   " + "银行卡余额: " + sal2);
        System.out.println("              ===第二个月===");
        System.out.println(manager.getName() + "的薪资: " + ming + "   |   " + "银行卡余额: " + 2 * sal1);
        System.out.println(clerk.getName() + "的薪资: " + liang + "   |   " + "银行卡余额: " + 2 * sal2);
        System.out.println("              ===第三个月===");
        System.out.println(manager.getName() + "的薪资: " + ming + "   |   " + "银行卡余额: " + 3 * sal1);
        System.out.println(clerk.getName() + "的薪资: " + liang + "   |   " + "银行卡余额: " + 3 * sal2);
    }
}
